package cc.atliberty.creating.registerSingleton;

/**
 * @Author 元宵
 * @url www.atliberty.cc
 * @Date 2023-10-30 18:37
 * @description: 登记式单例类测试
 */
public class RegSingletonTest {
    public static void main(String[] args) {
        // 测试单例性
        RegChildSingleton instance = RegChildSingleton.getInstance();
        RegChildSingleton instance1 = RegChildSingleton.getInstance();
        System.out.println(instance == instance1); // true
        
    }
}
